<?php

namespace App\Entity;

use ApiPlatform\Core\Annotation\ApiResource;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation\Groups;
use App\Base\Annotation\Common;
use Doctrine\ODM\MongoDB\Mapping\Annotations as ODM;

/**
 * @ApiResource()
 * @ODM\Document(repositoryClass="App\Repository\ContactBRepository")
 * @ORM\Entity()
 */
class ContactB
{
    /**
     * @Common(cnName="#",editType="text",listType="text")
     * @ODM\Id(strategy="INCREMENT")
     * @ORM\Id()
     * @ORM\GeneratedValue()
     * @ORM\Column(type="integer")
     */
    private $id;

    /**
     * @Common(cnName="公司名称",editType="text",listType="text")
     * @ODM\Field( nullable=true)
     * @ORM\Column(type="string", length=255, nullable=true)
     */
    private $name;

    /**
     * @Common(cnName="所在区域",editType="text",listType="text")
     * @ODM\Field( nullable=true)
     * @ORM\Column(type="string", length=255, nullable=true)
     */
    private $position;

    /**
     * @Common(cnName="联系地址",editType="text",listType="text")
     * @ODM\Field( nullable=true)
     * @ORM\Column(type="string", length=255, nullable=true)
     */
    private $address;

    /**
     * @Common(cnName="联系人",editType="text",listType="text")
     * @ODM\Field( nullable=true)
     * @ORM\Column(type="string", length=255, nullable=true)
     */
    private $contact;

    /**
     * @Common(cnName="联系电话",editType="text",listType="text")
     * @ODM\Field( nullable=true)
     * @ORM\Column(type="string", length=255, nullable=true)
     */
    private $phone;

    /**
     * @Common(cnName="客户类型",editType="text",listType="text")
     * @ODM\Field( nullable=true)
     * @ORM\Column(type="string", length=255, nullable=true)
     */
    private $type;

    /**
     * @Common(cnName="预估加油金额",editType="text",listType="text")
     * @ODM\Field( nullable=true)
     * @ORM\Column(type="string", length=255, nullable=true)
     */
    private $money;

    /**
     * @Common(cnName="是否处理",editType="switch",listType="text")
     * @ODM\Field(type="boolean", nullable=true)
     * @ORM\Column(type="boolean", nullable=true)
     */
    private $isDone = false;

    /**
     * @Common(cnName="提交时间",editType="datetime",listType="text")
     * @ODM\Field(type="date", nullable=true)
     * @ORM\Column(type="datetime", nullable=true)
     */
    private $createAt;

    public function getId(): ?int
    {
        return $this->id;
    }

    public function getName(): ?string
    {
        return $this->name;
    }

    public function setName(?string $name): self
    {
        $this->name = $name;

        return $this;
    }

    public function getPosition(): ?string
    {
        return $this->position;
    }

    public function setPosition(?string $position): self
    {
        $this->position = $position;

        return $this;
    }

    public function getAddress(): ?string
    {
        return $this->address;
    }

    public function setAddress(?string $address): self
    {
        $this->address = $address;

        return $this;
    }

    public function getContact(): ?string
    {
        return $this->contact;
    }

    public function setContact(?string $contact): self
    {
        $this->contact = $contact;

        return $this;
    }

    public function getPhone(): ?string
    {
        return $this->phone;
    }

    public function setPhone(?string $phone): self
    {
        $this->phone = $phone;

        return $this;
    }

    public function getType(): ?string
    {
        return $this->type;
    }

    public function setType(?string $type): self
    {
        $this->type = $type;

        return $this;
    }

    public function getMoney(): ?string
    {
        return $this->money;
    }

    public function setMoney(?string $money): self
    {
        $this->money = $money;

        return $this;
    }

    public function getIsDone(): ?bool
    {
        return $this->isDone;
    }

    public function setIsDone(?bool $isDone): self
    {
        $this->isDone = $isDone;

        return $this;
    }

    public function getCreateAt(): ?\DateTimeInterface
    {
        return $this->createAt;
    }

    public function setCreateAt(?\DateTimeInterface $createAt): self
    {
        $this->createAt = $createAt;

        return $this;
    }
}
